package org.neuedu.chapter04_0616;

public class ArrayDemo06 {
    public static void main(String[] args) {
        // 生成7个1-35之间的随机数
        boolean[] arr = new boolean[35]; // 35 个 false
        for (int i = 0; i < 7; i++) {
            int n = (int)(Math.random()*35+1);
            if (arr[n - 1]) {
                i--;
            }else{
                System.out.println(n);
                arr[n - 1] = true;
            }
        }
    }
}
